<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>User List</title>
  <style>
    body {
  font-family: Arial, sans-serif;
  margin: 20px;
}
h1, h2 {
  color: #333;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  margin-bottom: 10px;
  padding: 10px;
}
a {
  text-decoration: none;
  color: #007bff;
}
form {
  display: inline;
}
button {
  background-color: #007bff;
  border: none;
  color: white;
  padding: 5px 10px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  margin: 4px 2px;
  cursor: pointer;
}
button:hover {
  background-color: #0056b3;
}
  </style>
</head>
<body>
  <h1>用户列表</h1>
  <ul>
    <% users.forEach(user => { %>
      <li>
        用户名称：<%= user.name %> (用户年龄：<%= user.age %>), 邮箱: <%= user.email %>
        <a href="/users/<%= user.id %>/edit">编辑</a>
        <form action="/users/<%= user.id %>/delete" method="GET" style="display:inline;">
          <button type="submit">删除</button>
        </form>
      </li>
    <% }) %>
  </ul>

  <h2>创建新用户</h2>
  <form action="/users" method="POST">
    <label>姓名: <input type="text" name="name" required></label><br>
    <label>年龄: <input type="number" name="age" required></label><br>
    <label>邮箱: <input type="email" name="email" required></label><br>
    <button type="submit">创建</button>
  </form>
</body>
</html>